﻿<UserControl x:Class="CAION2.Views.Status_Page"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:CAION2.Controls"
             xmlns:helpers="clr-namespace:CAION2.Helpers"
             xmlns:mui="clr-namespace:FirstFloor.ModernUI.Windows.Controls;assembly=FirstFloor.ModernUI"
             xmlns:resources="clr-namespace:CAION2.Properties"
             xmlns:viewModels="clr-namespace:CAION2.ViewModels"
             xmlns:xctk="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
             FontFamily="/Fonts/Marmelad-Regular.ttf#Marmelad">

    <UserControl.Resources>

        <viewModels:StatusViewModel x:Key="ViewModels" />
        <viewModels:GameClassIconConverter x:Key="GameClassIconConverter" />
        <viewModels:StatsListToolTipConverter x:Key="StatsListToolTipConverter" />
        <helpers:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

        <Style x:Key="ItemsListViewItem"
               BasedOn="{StaticResource {x:Type ListViewItem}}"
               TargetType="ListViewItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListViewItem">
                        <Grid>
                            <Border Name="Selection" Visibility="Collapsed" />

                            <GridViewRowPresenter HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
                                                  VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
                                                  Content="{TemplateBinding ContentControl.Content}"
                                                  SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />

                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter TargetName="Selection" Property="Visibility" Value="Visible" />
                                <Setter TargetName="Selection" Property="Background" Value="{DynamicResource ItemBackgroundHover}" />
                                <Setter Property="Foreground" Value="{DynamicResource ItemTextHover}" />
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter TargetName="Selection" Property="Visibility" Value="Visible" />
                                <Setter TargetName="Selection" Property="Background" Value="{DynamicResource ItemBackgroundSelected}" />
                                <Setter Property="Foreground" Value="{DynamicResource ItemTextSelected}" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource ItemTextDisabled}" />
                            </Trigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="true">
                    <Setter Property="Foreground" Value="{DynamicResource ItemTextSelected}" />
                </Trigger>
            </Style.Triggers>
        </Style>

        <ContextMenu x:Key="StatsListMenu">
                <CheckBox Content="{x:Static resources:Resources.Status_StatsBasic}" 
                          IsChecked="{Binding StatsListColumnsVisible[0], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                          Command="{Binding StatsListColumnVisibleCommand}"/>
            <CheckBox Content="{x:Static resources:Resources.Status_StatsBonus}"
                      IsChecked="{Binding StatsListColumnsVisible[1], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Command="{Binding StatsListColumnVisibleCommand}"/>
            <CheckBox Content="{x:Static resources:Resources.Status_StatsSums}" 
                      IsChecked="{Binding StatsListColumnsVisible[2], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Command="{Binding StatsListColumnVisibleCommand}"/>
            <CheckBox Content="{x:Static resources:Resources.Status_StatsProcent}" 
                      IsChecked="{Binding StatsListColumnsVisible[3], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Command="{Binding StatsListColumnVisibleCommand}"/>
        </ContextMenu>

    </UserControl.Resources>

    <Grid DataContext="{Binding Source={StaticResource ViewModels}}" 
          Style="{StaticResource ContentRoot}">
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="70" />
            <RowDefinition Height="360" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <StackPanel Grid.Column="2"
                    Margin="{StaticResource HeaderMargin}"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Orientation="Horizontal">
            <mui:ModernButton Margin="0,0,10,0"
                              Command="{Binding LoadCharacterCommand}"
                              Content="{x:Static resources:Resources.Load}"
                              IconData="{StaticResource LoadIcon}"
                              ToolTip="{x:Static resources:Resources.Status_LoadCharacter}" />
            <mui:ModernButton Command="{Binding SaveCharacterCommand}"
                              Content="{x:Static resources:Resources.Save}"
                              IconData="{StaticResource SaveIcon}"
                              ToolTip="{x:Static resources:Resources.Status_SaveCharacter}" />
        </StackPanel>

        <ComboBox Grid.Row="0" 
                  Grid.Column="1"
                  Height="25"
                  Margin="0,0,50,0"
                  VerticalAlignment="Top"
                  ItemsSource="{Binding GameClasses}"
                  SelectedItem="{Binding CurrentCharacterClass}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Width="22"
                               Height="22"
                               Margin="0,0,10,0"
                               Source="{Binding Converter={StaticResource GameClassIconConverter}}" />
                        <TextBlock VerticalAlignment="Center" Text="{Binding}" />
                    </StackPanel>

                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

        <mui:ModernButton Grid.Row="0" 
                          Grid.Column="1"
                          Margin="0,3,0,0"
                          HorizontalAlignment="Right"
                          VerticalAlignment="Top"
                          Command="{Binding ClearPlacesCommand}"
                          IconData="{StaticResource ClearIcon}"
                          ToolTip="{x:Static resources:Resources.Status_ClearPlaces}" />

        <Slider Grid.Row="0" Grid.Column="1"
                Margin="0,35,60,0"
                IsSelectionRangeEnabled="True"
                Maximum="{Binding MaxCharacterLevel}"
                Minimum="10"
                SelectionEnd="{Binding CurrentCharacterLevel,
                                       Mode=OneWay,
                                       UpdateSourceTrigger=PropertyChanged}"
                SelectionStart="9"
                Value="{Binding CurrentCharacterLevel,
                                Mode=TwoWay}" />

        <xctk:IntegerUpDown Grid.Row="0" 
                            Grid.Column="1"
                            Width="50"
                            Height="20"
                            Margin="5,37,0,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Maximum="{Binding MaxCharacterLevel}"
                            Minimum="10"
                            Value="{Binding CurrentCharacterLevel,
                                            Mode=TwoWay,
                                            UpdateSourceTrigger=PropertyChanged}" />

        <Border Grid.Row="0" 
                Grid.RowSpan="4" 
                Grid.Column="0"
                Margin="0,50,0,20"
                HorizontalAlignment="Center"
                VerticalAlignment="Stretch">
            <controls:ItemCard BorderBrush="{DynamicResource ModernButtonBorderDisabled}"
                               BorderThickness="1"
                               DataContext="{Binding CurrentCard}"/>
        </Border>

        <Border Grid.Row="0"
                Grid.Column="0"
                Height="25"
                HorizontalAlignment="Center"
                VerticalAlignment="Top"
                BorderBrush="{DynamicResource Accent}"
                BorderThickness="4,0"
                Visibility="{Binding PlacesVisible}">
            <TextBlock Margin="10,0"
                       Style="{StaticResource Heading2}"
                       Foreground="{DynamicResource WindowText}"
                       Text="{Binding CurrentSlotName}"
                       TextAlignment="Center" />
        </Border>

        <Canvas Grid.Row="1"
                Grid.Column="1"
                Margin="15,0"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Visibility="{Binding PlacesVisible}">
            <Canvas.Background>
                <ImageBrush ImageSource="/CAION2;component/UI2/hud.png" Stretch="None"/>
            </Canvas.Background>

            <controls:CharacterPlace x:Name="Main"
                                     Margin="42,31,0,0"
                                     DataContext="{Binding Places[0]}" 
                                     Width="46"
                                     Height="46">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Armsfused"
                                     Margin="15,5,0,0"
                                     Width="34"
                                     Height="34"
                                     Panel.ZIndex="-1"
                                     DataContext="{Binding Places[15]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>
            
            <controls:CharacterPlace x:Name="Sub"
                                     Margin="130,31,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[1]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Wing"
                                     Margin="86,75,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[2]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Head"
                                     Margin="1,75,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[3]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="LeftEar"
                                     Margin="1,120,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[4]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Torso"
                                     Margin="1,165,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[5]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Leg"
                                     Margin="1,210,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[6]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="LeftRing"
                                     Margin="18,255,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[7]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Foot"
                                     Margin="48,300,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[8]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Neck"
                                     Margin="173,75,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[9]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="RightEar"
                                     Margin="173,120,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[10]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Shoulder"
                                     Margin="173,165,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[11]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Glove"
                                     Margin="173,210,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[12]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="RightRing"
                                     Margin="154,255,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[13]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

            <controls:CharacterPlace x:Name="Belt"
                                     Margin="123,300,0,0"
                                     Width="46"
                                     Height="46"
                                     DataContext="{Binding Places[14]}">
                <controls:CharacterPlace.InputBindings>
                    <MouseBinding Command="{Binding GetItemForPlaceCommand}" Gesture="LeftDoubleClick" />
                    <MouseBinding Command="{Binding OpenPlaceCommand}" Gesture="LeftClick" />
                </controls:CharacterPlace.InputBindings>
            </controls:CharacterPlace>

        </Canvas>

        <TextBlock Grid.Row="2"
                   Grid.ColumnSpan="3" Grid.Column="0"
                   Margin="0,40,0,0"
                   HorizontalAlignment="Center"
                   FontSize="10"
                   Foreground="{DynamicResource ItemText}"
                   Text="{x:Static resources:Resources.Status_ClickTooltip}"
                   TextAlignment="Center"
                   Visibility="{Binding PlacesVisible}" />

        <StackPanel Grid.Row="0" 
                    Grid.RowSpan="4"
                    Grid.Column="2"
                    HorizontalAlignment="Center"
                    Orientation="Vertical"
                    Visibility="{Binding PlacesVisible}">

            <StackPanel Orientation="Horizontal" Margin="5,0,0,10">
                <RadioButton Content="{x:Static resources:Resources.StatsList_AllStats}"
                             Command="{Binding SelectStatsListCommand}"
                             CommandParameter="all"
                             IsChecked="True"
                             Margin="0,0,20,0"/>
                <RadioButton Content="{x:Static resources:Resources.StatsList_Hands}"
                             Command="{Binding SelectStatsListCommand}"
                             CommandParameter="hands"
                             Margin="0,0,20,0"/>
                <RadioButton Content="{x:Static resources:Resources.StatsList_Other}"
                             Command="{Binding SelectStatsListCommand}"
                             CommandParameter="basics"/>
            </StackPanel>
            
            <ListView IsSynchronizedWithCurrentItem="True"
                  ItemContainerStyle="{StaticResource ItemsListViewItem}"
                  ItemsSource="{Binding StatsView}"
                  SelectionMode="Single"
                      ContextMenu="{StaticResource StatsListMenu}"
                  VirtualizingStackPanel.IsVirtualizing="True"
                  VirtualizingStackPanel.VirtualizationMode="Recycling"
                  FontFamily="/Fonts/UbuntuMono-R.ttf#Ubuntu Mono"
                      
                  helpers:GridViewSort.AutoSort="True">
                <ListView.View>
                    <GridView>
                        <GridView.Columns>

                            <GridViewColumn Width="25" 
                                            helpers:GridViewSort.PropertyName="Position">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock FontSize="10" 
                                               Text="{Binding Path=Position}"
                                               TextAlignment="Center" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Width="130" helpers:GridViewSort.PropertyName="Translate">
                                <GridViewColumn.Header>
                                    <GridViewColumnHeader HorizontalContentAlignment="Left" Content="{x:Static resources:Resources.Status_StatsNames}" />
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2,4,0,2"
                                               Text="{Binding Path=Translate}"
                                               TextWrapping="WrapWithOverflow" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Width="50"
                                            helpers:GridViewColumnVisibilityManager.Visibility="{Binding StatsListColumnsVisible[0], 
                                                                                                         Mode=OneWay,
                                                                                                         UpdateSourceTrigger=PropertyChanged,
                                                                                                         Converter={StaticResource BooleanToVisibilityConverter}}"
                                        helpers:GridViewSort.GlyphIsLeft="True"
                                        helpers:GridViewSort.PropertyName="BasicSum">
                                <GridViewColumn.Header>
                                    <GridViewColumnHeader HorizontalContentAlignment="Right" Content="{x:Static resources:Resources.Status_StatsBasic}" />
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2,4,0,2"
                                               Text="{Binding Path=BasicSumText}"
                                               TextAlignment="Right" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Width="55"
                                            helpers:GridViewColumnVisibilityManager.Visibility="{Binding StatsListColumnsVisible[1], 
                                                                                                         Mode=OneWay,
                                                                                                         UpdateSourceTrigger=PropertyChanged,
                                                                                                         Converter={StaticResource BooleanToVisibilityConverter}}"
                                        helpers:GridViewSort.GlyphIsLeft="True"
                                        helpers:GridViewSort.PropertyName="BonusSum">
                                <GridViewColumn.Header>
                                    <GridViewColumnHeader HorizontalContentAlignment="Right" Content="{x:Static resources:Resources.Status_StatsBonus}" />
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2,4,0,2"
                                               Text="{Binding Path=BonusSumText}"
                                               TextAlignment="Right">
                                            <TextBlock.Style>
                                                <Style TargetType="{x:Type TextBlock}">
                                                    <Setter Property="Foreground" Value="{DynamicResource StatsBonusColor}" />
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" Value="True">
                                                            <Setter Property="Foreground" Value="{DynamicResource ItemTextSelected}" />
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Width="60"
                                            helpers:GridViewColumnVisibilityManager.Visibility="{Binding StatsListColumnsVisible[2], 
                                                                                                         Mode=OneWay,
                                                                                                         UpdateSourceTrigger=PropertyChanged,
                                                                                                         Converter={StaticResource BooleanToVisibilityConverter}}"
                                        helpers:GridViewSort.GlyphIsLeft="True"
                                        helpers:GridViewSort.PropertyName="Sums">
                                <GridViewColumn.Header>
                                    <GridViewColumnHeader HorizontalContentAlignment="Right" Content="{x:Static resources:Resources.Status_StatsSums}" />
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2,4,0,2"
                                               FontWeight="DemiBold"
                                               Text="{Binding Path=SumsText}"
                                               TextAlignment="Right" >
                                            <TextBlock.ToolTip>
                                                <MultiBinding Converter="{StaticResource StatsListToolTipConverter}">
                                                    <Binding Path="BasicSumText"/>
                                                    <Binding Path="BonusSumText"/>
                                                 </MultiBinding>
                                                 </TextBlock.ToolTip>
                                        </TextBlock>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Width="50"
                                            helpers:GridViewColumnVisibilityManager.Visibility="{Binding StatsListColumnsVisible[3], 
                                                                                                         Mode=OneWay,
                                                                                                         UpdateSourceTrigger=PropertyChanged,
                                                                                                         Converter={StaticResource BooleanToVisibilityConverter}}"
                                        Header="{x:Static resources:Resources.Status_StatsProcent}"
                                        helpers:GridViewSort.PropertyName="Procent"
                                        helpers:GridViewSort.ShowSortGlyph="False">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2,4,0,2"
                                               Text="{Binding Path=Procent}"
                                               TextAlignment="Center" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                        </GridView.Columns>
                    </GridView>
                </ListView.View>
            </ListView>

            <TextBlock Margin="0,15,0,0"
                       TextAlignment="Center"
                       Text="{x:Static resources:Resources.Status_TableToolTip}"
                       FontSize="10"
                       Foreground="{DynamicResource ItemText}"/>
            
        </StackPanel>
        
    </Grid>

</UserControl>
